home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Graphics Programming (2nd Edition) / Visual Basic Graphics Programming 2nd Edition.iso / OldSrc / CH12 / SRC / COLOR.FRM (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1997-01-08  |  43.7 KB  |  1,417 lines

  1. VERSION 4.00
  2. Begin VB.Form ColorForm 
  3.    Appearance      =   0  'Flat
  4.    Caption         =   "Color"
  5.    ClientHeight    =   5820
  6.    ClientLeft      =   900
  7.    ClientTop       =   645
  8.    ClientWidth     =   7455
  9.    BeginProperty Font 
  10.       name            =   "MS Sans Serif"
  11.       charset         =   0
  12.       weight          =   700
  13.       size            =   8.25
  14.       underline       =   0   'False
  15.       italic          =   0   'False
  16.       strikethrough   =   0   'False
  17.    EndProperty
  18.    ForeColor       =   &H80000008&
  19.    Height          =   6510
  20.    KeyPreview      =   -1  'True
  21.    Left            =   840
  22.    LinkTopic       =   "Form1"
  23.    ScaleHeight     =   5820
  24.    ScaleWidth      =   7455
  25.    Top             =   15
  26.    Width           =   7575
  27.    Begin VB.TextBox IirText 
  28.       BeginProperty Font 
  29.          name            =   "MS Sans Serif"
  30.          charset         =   0
  31.          weight          =   700
  32.          size            =   8.25
  33.          underline       =   0   'False
  34.          italic          =   0   'False
  35.          strikethrough   =   0   'False
  36.       EndProperty
  37.       Height          =   285
  38.       Left            =   480
  39.       TabIndex        =   44
  40.       Text            =   "255"
  41.       Top             =   3600
  42.       Width           =   855
  43.    End
  44.    Begin VB.TextBox IigText 
  45.       BeginProperty Font 
  46.          name            =   "MS Sans Serif"
  47.          charset         =   0
  48.          weight          =   700
  49.          size            =   8.25
  50.          underline       =   0   'False
  51.          italic          =   0   'False
  52.          strikethrough   =   0   'False
  53.       EndProperty
  54.       Height          =   285
  55.       Left            =   480
  56.       TabIndex        =   43
  57.       Text            =   "255"
  58.       Top             =   3960
  59.       Width           =   855
  60.    End
  61.    Begin VB.TextBox IibText 
  62.       BeginProperty Font 
  63.          name            =   "MS Sans Serif"
  64.          charset         =   0
  65.          weight          =   700
  66.          size            =   8.25
  67.          underline       =   0   'False
  68.          italic          =   0   'False
  69.          strikethrough   =   0   'False
  70.       EndProperty
  71.       Height          =   285
  72.       Left            =   480
  73.       TabIndex        =   42
  74.       Text            =   "255"
  75.       Top             =   4320
  76.       Width           =   855
  77.    End
  78.    Begin VB.TextBox IarText 
  79.       BeginProperty Font 
  80.          name            =   "MS Sans Serif"
  81.          charset         =   0
  82.          weight          =   700
  83.          size            =   8.25
  84.          underline       =   0   'False
  85.          italic          =   0   'False
  86.          strikethrough   =   0   'False
  87.       EndProperty
  88.       Height          =   285
  89.       Left            =   480
  90.       TabIndex        =   35
  91.       Text            =   "128"
  92.       Top             =   2400
  93.       Width           =   855
  94.    End
  95.    Begin VB.TextBox IagText 
  96.       BeginProperty Font 
  97.          name            =   "MS Sans Serif"
  98.          charset         =   0
  99.          weight          =   700
  100.          size            =   8.25
  101.          underline       =   0   'False
  102.          italic          =   0   'False
  103.          strikethrough   =   0   'False
  104.       EndProperty
  105.       Height          =   285
  106.       Left            =   480
  107.       TabIndex        =   34
  108.       Text            =   "128"
  109.       Top             =   2760
  110.       Width           =   855
  111.    End
  112.    Begin VB.TextBox IabText 
  113.       BeginProperty Font 
  114.          name            =   "MS Sans Serif"
  115.          charset         =   0
  116.          weight          =   700
  117.          size            =   8.25
  118.          underline       =   0   'False
  119.          italic          =   0   'False
  120.          strikethrough   =   0   'False
  121.       EndProperty
  122.       Height          =   285
  123.       Left            =   480
  124.       TabIndex        =   33
  125.       Text            =   "128"
  126.       Top             =   3120
  127.       Width           =   855
  128.    End
  129.    Begin VB.TextBox KabText 
  130.       BeginProperty Font 
  131.          name            =   "MS Sans Serif"
  132.          charset         =   0
  133.          weight          =   700
  134.          size            =   8.25
  135.          underline       =   0   'False
  136.          italic          =   0   'False
  137.          strikethrough   =   0   'False
  138.       EndProperty
  139.       Height          =   285
  140.       Left            =   480
  141.       TabIndex        =   30
  142.       Text            =   "0.30"
  143.       Top             =   1920
  144.       Width           =   855
  145.    End
  146.    Begin VB.TextBox KagText 
  147.       BeginProperty Font 
  148.          name            =   "MS Sans Serif"
  149.          charset         =   0
  150.          weight          =   700
  151.          size            =   8.25
  152.          underline       =   0   'False
  153.          italic          =   0   'False
  154.          strikethrough   =   0   'False
  155.       EndProperty
  156.       Height          =   285
  157.       Left            =   480
  158.       TabIndex        =   27
  159.       Text            =   "0.30"
  160.       Top             =   1560
  161.       Width           =   855
  162.    End
  163.    Begin VB.TextBox KdbText 
  164.       BeginProperty Font 
  165.          name            =   "MS Sans Serif"
  166.          charset         =   0
  167.          weight          =   700
  168.          size            =   8.25
  169.          underline       =   0   'False
  170.          italic          =   0   'False
  171.          strikethrough   =   0   'False
  172.       EndProperty
  173.       Height          =   285
  174.       Left            =   480
  175.       TabIndex        =   24
  176.       Text            =   "0.65"
  177.       Top             =   720
  178.       Width           =   855
  179.    End
  180.    Begin VB.TextBox KdgText 
  181.       BeginProperty Font 
  182.          name            =   "MS Sans Serif"
  183.          charset         =   0
  184.          weight          =   700
  185.          size            =   8.25
  186.          underline       =   0   'False
  187.          italic          =   0   'False
  188.          strikethrough   =   0   'False
  189.       EndProperty
  190.       Height          =   285
  191.       Left            =   480
  192.       TabIndex        =   21
  193.       Text            =   "0.65"
  194.       Top             =   360
  195.       Width           =   855
  196.    End
  197.    Begin VB.TextBox NText 
  198.       BeginProperty Font 
  199.          name            =   "MS Sans Serif"
  200.          charset         =   0
  201.          weight          =   700
  202.          size            =   8.25
  203.          underline       =   0   'False
  204.          italic          =   0   'False
  205.          strikethrough   =   0   'False
  206.       EndProperty
  207.       Height          =   285
  208.       Left            =   480
  209.       TabIndex        =   19
  210.       Text            =   "100"
  211.       Top             =   5520
  212.       Width           =   855
  213.    End
  214.    Begin VB.TextBox KsText 
  215.       BeginProperty Font 
  216.          name            =   "MS Sans Serif"
  217.          charset         =   0
  218.          weight          =   700
  219.          size            =   8.25
  220.          underline       =   0   'False
  221.          italic          =   0   'False
  222.          strikethrough   =   0   'False
  223.       EndProperty
  224.       Height          =   285
  225.       Left            =   480
  226.       TabIndex        =   16
  227.       Text            =   "5"
  228.       Top             =   5160
  229.       Width           =   855
  230.    End
  231.    Begin VB.TextBox KdistText 
  232.       BeginProperty Font 
  233.          name            =   "MS Sans Serif"
  234.          charset         =   0
  235.          weight          =   700
  236.          size            =   8.25
  237.          underline       =   0   'False
  238.          italic          =   0   'False
  239.          strikethrough   =   0   'False
  240.       EndProperty
  241.       Height          =   285
  242.       Left            =   480
  243.       TabIndex        =   13
  244.       Text            =   "-1100"
  245.       Top             =   4800
  246.       Width           =   855
  247.    End
  248.    Begin VB.TextBox KarText 
  249.       BeginProperty Font 
  250.          name            =   "MS Sans Serif"
  251.          charset         =   0
  252.          weight          =   700
  253.          size            =   8.25
  254.          underline       =   0   'False
  255.          italic          =   0   'False
  256.          strikethrough   =   0   'False
  257.       EndProperty
  258.       Height          =   285
  259.       Left            =   480
  260.       TabIndex        =   10
  261.       Text            =   "0.30"
  262.       Top             =   1200
  263.       Width           =   855
  264.    End
  265.    Begin VB.TextBox KdrText 
  266.       BeginProperty Font 
  267.          name            =   "MS Sans Serif"
  268.          charset         =   0
  269.          weight          =   700
  270.          size            =   8.25
  271.          underline       =   0   'False
  272.          italic          =   0   'False
  273.          strikethrough   =   0   'False
  274.       EndProperty
  275.       Height          =   285
  276.       Left            =   480
  277.       TabIndex        =   8
  278.       Text            =   "0.65"
  279.       Top             =   0
  280.       Width           =   855
  281.    End
  282.    Begin VB.TextBox PhiText 
  283.       BeginProperty Font 
  284.          name            =   "MS Sans Serif"
  285.          charset         =   0
  286.          weight          =   700
  287.          size            =   8.25
  288.          underline       =   0   'False
  289.          italic          =   0   'False
  290.          strikethrough   =   0   'False
  291.       EndProperty
  292.       Height          =   285
  293.       Left            =   5400
  294.       TabIndex        =   6
  295.       Text            =   "0.1571"
  296.       Top             =   5520
  297.       Width           =   855
  298.    End
  299.    Begin VB.TextBox ThetaText 
  300.       BeginProperty Font 
  301.          name            =   "MS Sans Serif"
  302.          charset         =   0
  303.          weight          =   700
  304.          size            =   8.25
  305.          underline       =   0   'False
  306.          italic          =   0   'False
  307.          strikethrough   =   0   'False
  308.       EndProperty
  309.       Height          =   285
  310.       Left            =   3840
  311.       TabIndex        =   4
  312.       Text            =   "1.8850"
  313.       Top             =   5520
  314.       Width           =   855
  315.    End
  316.    Begin VB.TextBox RText 
  317.       BeginProperty Font 
  318.          name            =   "MS Sans Serif"
  319.          charset         =   0
  320.          weight          =   700
  321.          size            =   8.25
  322.          underline       =   0   'False
  323.          italic          =   0   'False
  324.          strikethrough   =   0   'False
  325.       EndProperty
  326.       Height          =   285
  327.       Left            =   2280
  328.       TabIndex        =   2
  329.       Text            =   "20.0000"
  330.       Top             =   5520
  331.       Width           =   855
  332.    End
  333.    Begin VB.PictureBox Pict 
  334.       AutoRedraw      =   -1  'True
  335.       BackColor       =   &H00FFFF80&
  336.       BeginProperty Font 
  337.          name            =   "MS Sans Serif"
  338.          charset         =   0
  339.          weight          =   700
  340.          size            =   8.25
  341.          underline       =   0   'False
  342.          italic          =   0   'False
  343.          strikethrough   =   0   'False
  344.       EndProperty
  345.       Height          =   5415
  346.       Left            =   1440
  347.       Picture         =   "Color.frx":0000
  348.       ScaleHeight     =   -14.321
  349.       ScaleLeft       =   -7
  350.       ScaleMode       =   0  'User
  351.       ScaleTop        =   7
  352.       ScaleWidth      =   15.926
  353.       TabIndex        =   0
  354.       Top             =   0
  355.       Width           =   6015
  356.    End
  357.    Begin VB.Label Label1 
  358.       Caption         =   "i,r"
  359.       BeginProperty Font 
  360.          name            =   "MS Sans Serif"
  361.          charset         =   0
  362.          weight          =   700
  363.          size            =   8.25
  364.          underline       =   0   'False
  365.          italic          =   0   'False
  366.          strikethrough   =   0   'False
  367.       EndProperty
  368.       Height          =   255
  369.       Index           =   31
  370.       Left            =   120
  371.       TabIndex        =   50
  372.       Top             =   3720
  373.       Width           =   375
  374.    End
  375.    Begin VB.Label Label1 
  376.       Caption         =   "I"
  377.       BeginProperty Font 
  378.          name            =   "MS Sans Serif"
  379.          charset         =   0
  380.          weight          =   700
  381.          size            =   8.25
  382.          underline       =   0   'False
  383.          italic          =   0   'False
  384.          strikethrough   =   0   'False
  385.       EndProperty
  386.       Height          =   255
  387.       Index           =   30
  388.       Left            =   0
  389.       TabIndex        =   49
  390.       Top             =   3600
  391.       Width           =   135
  392.    End
  393.    Begin VB.Label Label1 
  394.       Caption         =   "I"
  395.       BeginProperty Font 
  396.          name            =   "MS Sans Serif"
  397.          charset         =   0
  398.          weight          =   700
  399.          size            =   8.25
  400.          underline       =   0   'False
  401.          italic          =   0   'False
  402.          strikethrough   =   0   'False
  403.       EndProperty
  404.       Height          =   255
  405.       Index           =   29
  406.       Left            =   0
  407.       TabIndex        =   48
  408.       Top             =   3960
  409.       Width           =   135
  410.    End
  411.    Begin VB.Label Label1 
  412.       Caption         =   "i,g"
  413.       BeginProperty Font 
  414.          name            =   "MS Sans Serif"
  415.          charset         =   0
  416.          weight          =   700
  417.          size            =   8.25
  418.          underline       =   0   'False
  419.          italic          =   0   'False
  420.          strikethrough   =   0   'False
  421.       EndProperty
  422.       Height          =   255
  423.       Index           =   28
  424.       Left            =   120
  425.       TabIndex        =   47
  426.       Top             =   4080
  427.       Width           =   375
  428.    End
  429.    Begin VB.Label Label1 
  430.       Caption         =   "I"
  431.       BeginProperty Font 
  432.          name            =   "MS Sans Serif"
  433.          charset         =   0
  434.          weight          =   700
  435.          size            =   8.25
  436.          underline       =   0   'False
  437.          italic          =   0   'False
  438.          strikethrough   =   0   'False
  439.       EndProperty
  440.       Height          =   255
  441.       Index           =   27
  442.       Left            =   0
  443.       TabIndex        =   46
  444.       Top             =   4320
  445.       Width           =   135
  446.    End
  447.    Begin VB.Label Label1 
  448.       Caption         =   "i,b"
  449.       BeginProperty Font 
  450.          name            =   "MS Sans Serif"
  451.          charset         =   0
  452.          weight          =   700
  453.          size            =   8.25
  454.          underline       =   0   'False
  455.          italic          =   0   'False
  456.          strikethrough   =   0   'False
  457.       EndProperty
  458.       Height          =   255
  459.       Index           =   26
  460.       Left            =   120
  461.       TabIndex        =   45
  462.       Top             =   4440
  463.       Width           =   375
  464.    End
  465.    Begin VB.Label Label1 
  466.       Caption         =   "a,r"
  467.       BeginProperty Font 
  468.          name            =   "MS Sans Serif"
  469.          charset         =   0
  470.          weight          =   700
  471.          size            =   8.25
  472.          underline       =   0   'False
  473.          italic          =   0   'False
  474.          strikethrough   =   0   'False
  475.       EndProperty
  476.       Height          =   255
  477.       Index           =   25
  478.       Left            =   120
  479.       TabIndex        =   41
  480.       Top             =   2520
  481.       Width           =   375
  482.    End
  483.    Begin VB.Label Label1 
  484.       Caption         =   "I"
  485.       BeginProperty Font 
  486.          name            =   "MS Sans Serif"
  487.          charset         =   0
  488.          weight          =   700
  489.          size            =   8.25
  490.          underline       =   0   'False
  491.          italic          =   0   'False
  492.          strikethrough   =   0   'False
  493.       EndProperty
  494.       Height          =   255
  495.       Index           =   24
  496.       Left            =   0
  497.       TabIndex        =   40
  498.       Top             =   2400
  499.       Width           =   135
  500.    End
  501.    Begin VB.Label Label1 
  502.       Caption         =   "I"
  503.       BeginProperty Font 
  504.          name            =   "MS Sans Serif"
  505.          charset         =   0
  506.          weight          =   700
  507.          size            =   8.25
  508.          underline       =   0   'False
  509.          italic          =   0   'False
  510.          strikethrough   =   0   'False
  511.       EndProperty
  512.       Height          =   255
  513.       Index           =   23
  514.       Left            =   0
  515.       TabIndex        =   39
  516.       Top             =   2760
  517.       Width           =   135
  518.    End
  519.    Begin VB.Label Label1 
  520.       Caption         =   "a,g"
  521.       BeginProperty Font 
  522.          name            =   "MS Sans Serif"
  523.          charset         =   0
  524.          weight          =   700
  525.          size            =   8.25
  526.          underline       =   0   'False
  527.          italic          =   0   'False
  528.          strikethrough   =   0   'False
  529.       EndProperty
  530.       Height          =   255
  531.       Index           =   22
  532.       Left            =   120
  533.       TabIndex        =   38
  534.       Top             =   2880
  535.       Width           =   375
  536.    End
  537.    Begin VB.Label Label1 
  538.       Caption         =   "I"
  539.       BeginProperty Font 
  540.          name            =   "MS Sans Serif"
  541.          charset         =   0
  542.          weight          =   700
  543.          size            =   8.25
  544.          underline       =   0   'False
  545.          italic          =   0   'False
  546.          strikethrough   =   0   'False
  547.       EndProperty
  548.       Height          =   255
  549.       Index           =   21
  550.       Left            =   0
  551.       TabIndex        =   37
  552.       Top             =   3120
  553.       Width           =   135
  554.    End
  555.    Begin VB.Label Label1 
  556.       Caption         =   "a,b"
  557.       BeginProperty Font 
  558.          name            =   "MS Sans Serif"
  559.          charset         =   0
  560.          weight          =   700
  561.          size            =   8.25
  562.          underline       =   0   'False
  563.          italic          =   0   'False
  564.          strikethrough   =   0   'False
  565.       EndProperty
  566.       Height          =   255
  567.       Index           =   20
  568.       Left            =   120
  569.       TabIndex        =   36
  570.       Top             =   3240
  571.       Width           =   375
  572.    End
  573.    Begin VB.Label Label1 
  574.       Caption         =   "a,b"
  575.       BeginProperty Font 
  576.          name            =   "MS Sans Serif"
  577.          charset         =   0
  578.          weight          =   700
  579.          size            =   8.25
  580.          underline       =   0   'False
  581.          italic          =   0   'False
  582.          strikethrough   =   0   'False
  583.       EndProperty
  584.       Height          =   255
  585.       Index           =   19
  586.       Left            =   120
  587.       TabIndex        =   32
  588.       Top             =   2040
  589.       Width           =   375
  590.    End
  591.    Begin VB.Label Label1 
  592.       Caption         =   "k"
  593.       BeginProperty Font 
  594.          name            =   "MS Sans Serif"
  595.          charset         =   0
  596.          weight          =   700
  597.          size            =   8.25
  598.          underline       =   0   'False
  599.          italic          =   0   'False
  600.          strikethrough   =   0   'False
  601.       EndProperty
  602.       Height          =   255
  603.       Index           =   18
  604.       Left            =   0
  605.       TabIndex        =   31
  606.       Top             =   1920
  607.       Width           =   135
  608.    End
  609.    Begin VB.Label Label1 
  610.       Caption         =   "a,g"
  611.       BeginProperty Font 
  612.          name            =   "MS Sans Serif"
  613.          charset         =   0
  614.          weight          =   700
  615.          size            =   8.25
  616.          underline       =   0   'False
  617.          italic          =   0   'False
  618.          strikethrough   =   0   'False
  619.       EndProperty
  620.       Height          =   255
  621.       Index           =   17
  622.       Left            =   120
  623.       TabIndex        =   29
  624.       Top             =   1680
  625.       Width           =   375
  626.    End
  627.    Begin VB.Label Label1 
  628.       Caption         =   "k"
  629.       BeginProperty Font 
  630.          name            =   "MS Sans Serif"
  631.          charset         =   0
  632.          weight          =   700
  633.          size            =   8.25
  634.          underline       =   0   'False
  635.          italic          =   0   'False
  636.          strikethrough   =   0   'False
  637.       EndProperty
  638.       Height          =   255
  639.       Index           =   16
  640.       Left            =   0
  641.       TabIndex        =   28
  642.       Top             =   1560
  643.       Width           =   135
  644.    End
  645.    Begin VB.Label Label1 
  646.       Caption         =   "k"
  647.       BeginProperty Font 
  648.          name            =   "MS Sans Serif"
  649.          charset         =   0
  650.          weight          =   700
  651.          size            =   8.25
  652.          underline       =   0   'False
  653.          italic          =   0   'False
  654.          strikethrough   =   0   'False
  655.       EndProperty
  656.       Height          =   255
  657.       Index           =   15
  658.       Left            =   0
  659.       TabIndex        =   26
  660.       Top             =   720
  661.       Width           =   135
  662.    End
  663.    Begin VB.Label Label1 
  664.       Caption         =   "d,b"
  665.       BeginProperty Font 
  666.          name            =   "MS Sans Serif"
  667.          charset         =   0
  668.          weight          =   700
  669.          size            =   8.25
  670.          underline       =   0   'False
  671.          italic          =   0   'False
  672.          strikethrough   =   0   'False
  673.       EndProperty
  674.       Height          =   255
  675.       Index           =   14
  676.       Left            =   120
  677.       TabIndex        =   25
  678.       Top             =   840
  679.       Width           =   375
  680.    End
  681.    Begin VB.Label Label1 
  682.       Caption         =   "k"
  683.       BeginProperty Font 
  684.          name            =   "MS Sans Serif"
  685.          charset         =   0
  686.          weight          =   700
  687.          size            =   8.25
  688.          underline       =   0   'False
  689.          italic          =   0   'False
  690.          strikethrough   =   0   'False
  691.       EndProperty
  692.       Height          =   255
  693.       Index           =   13
  694.       Left            =   0
  695.       TabIndex        =   23
  696.       Top             =   360
  697.       Width           =   135
  698.    End
  699.    Begin VB.Label Label1 
  700.       Caption         =   "d,g"
  701.       BeginProperty Font 
  702.          name            =   "MS Sans Serif"
  703.          charset         =   0
  704.          weight          =   700
  705.          size            =   8.25
  706.          underline       =   0   'False
  707.          italic          =   0   'False
  708.          strikethrough   =   0   'False
  709.       EndProperty
  710.       Height          =   255
  711.       Index           =   11
  712.       Left            =   120
  713.       TabIndex        =   22
  714.       Top             =   480
  715.       Width           =   375
  716.    End
  717.    Begin VB.Label Label1 
  718.       Caption         =   "N"
  719.       BeginProperty Font 
  720.          name            =   "MS Sans Serif"
  721.          charset         =   0
  722.          weight          =   700
  723.          size            =   8.25
  724.          underline       =   0   'False
  725.          italic          =   0   'False
  726.          strikethrough   =   0   'False
  727.       EndProperty
  728.       Height          =   255
  729.       Index           =   12
  730.       Left            =   0
  731.       TabIndex        =   20
  732.       Top             =   5520
  733.       Width           =   135
  734.    End
  735.    Begin VB.Label Label1 
  736.       Caption         =   "k"
  737.       BeginProperty Font 
  738.          name            =   "MS Sans Serif"
  739.          charset         =   0
  740.          weight          =   700
  741.          size            =   8.25
  742.          underline       =   0   'False
  743.          italic          =   0   'False
  744.          strikethrough   =   0   'False
  745.       EndProperty
  746.       Height          =   255
  747.       Index           =   10
  748.       Left            =   0
  749.       TabIndex        =   18
  750.       Top             =   5160
  751.       Width           =   135
  752.    End
  753.    Begin VB.Label Label1 
  754.       Caption         =   "s"
  755.       BeginProperty Font 
  756.          name            =   "MS Sans Serif"
  757.          charset         =   0
  758.          weight          =   700
  759.          size            =   8.25
  760.          underline       =   0   'False
  761.          italic          =   0   'False
  762.          strikethrough   =   0   'False
  763.       EndProperty
  764.       Height          =   255
  765.       Index           =   9
  766.       Left            =   120
  767.       TabIndex        =   17
  768.       Top             =   5280
  769.       Width           =   135
  770.    End
  771.    Begin VB.Label Label1 
  772.       Caption         =   "dist"
  773.       BeginProperty Font 
  774.          name            =   "MS Sans Serif"
  775.          charset         =   0
  776.          weight          =   700
  777.          size            =   8.25
  778.          underline       =   0   'False
  779.          italic          =   0   'False
  780.          strikethrough   =   0   'False
  781.       EndProperty
  782.       Height          =   255
  783.       Index           =   8
  784.       Left            =   120
  785.       TabIndex        =   15
  786.       Top             =   4920
  787.       Width           =   375
  788.    End
  789.    Begin VB.Label Label1 
  790.       Caption         =   "k"
  791.       BeginProperty Font 
  792.          name            =   "MS Sans Serif"
  793.          charset         =   0
  794.          weight          =   700
  795.          size            =   8.25
  796.          underline       =   0   'False
  797.          italic          =   0   'False
  798.          strikethrough   =   0   'False
  799.       EndProperty
  800.       Height          =   255
  801.       Index           =   6
  802.       Left            =   0
  803.       TabIndex        =   14
  804.       Top             =   4800
  805.       Width           =   135
  806.    End
  807.    Begin VB.Label Label1 
  808.       Caption         =   "k"
  809.       BeginProperty Font 
  810.          name            =   "MS Sans Serif"
  811.          charset         =   0
  812.          weight          =   700
  813.          size            =   8.25
  814.          underline       =   0   'False
  815.          italic          =   0   'False
  816.          strikethrough   =   0   'False
  817.       EndProperty
  818.       Height          =   255
  819.       Index           =   5
  820.       Left            =   0
  821.       TabIndex        =   12
  822.       Top             =   1200
  823.       Width           =   135
  824.    End
  825.    Begin VB.Label Label1 
  826.       Caption         =   "a,r"
  827.       BeginProperty Font 
  828.          name            =   "MS Sans Serif"
  829.          charset         =   0
  830.          weight          =   700
  831.          size            =   8.25
  832.          underline       =   0   'False
  833.          italic          =   0   'False
  834.          strikethrough   =   0   'False
  835.       EndProperty
  836.       Height          =   255
  837.       Index           =   4
  838.       Left            =   120
  839.       TabIndex        =   11
  840.       Top             =   1320
  841.       Width           =   375
  842.    End
  843.    Begin VB.Label Label1 
  844.       Caption         =   "d,r"
  845.       BeginProperty Font 
  846.          name            =   "MS Sans Serif"
  847.          charset         =   0
  848.          weight          =   700
  849.          size            =   8.25
  850.          underline       =   0   'False
  851.          italic          =   0   'False
  852.          strikethrough   =   0   'False
  853.       EndProperty
  854.       Height          =   255
  855.       Index           =   3
  856.       Left            =   120
  857.       TabIndex        =   9
  858.       Top             =   120
  859.       Width           =   375
  860.    End
  861.    Begin MSComDlg.CommonDialog LoadDialog 
  862.       Left            =   6360
  863.       Top             =   5280
  864.       _Version        =   65536
  865.       _ExtentX        =   847
  866.       _ExtentY        =   847
  867.       _StockProps     =   0
  868.       CancelError     =   -1  'True
  869.    End
  870.    Begin VB.Label Label1 
  871.       Caption         =   "k"
  872.       BeginProperty Font 
  873.          name            =   "MS Sans Serif"
  874.          charset         =   0
  875.          weight          =   700
  876.          size            =   8.25
  877.          underline       =   0   'False
  878.          italic          =   0   'False
  879.          strikethrough   =   0   'False
  880.       EndProperty
  881.       Height          =   255
  882.       Index           =   7
  883.       Left            =   0
  884.       TabIndex        =   7
  885.       Top             =   0
  886.       Width           =   135
  887.    End
  888.    Begin VB.Label Label1 
  889.       Caption         =   "Phi"
  890.       BeginProperty Font 
  891.          name            =   "MS Sans Serif"
  892.          charset         =   0
  893.          weight          =   700
  894.          size            =   8.25
  895.          underline       =   0   'False
  896.          italic          =   0   'False
  897.          strikethrough   =   0   'False
  898.       EndProperty
  899.       Height          =   255
  900.       Index           =   2
  901.       Left            =   5040
  902.       TabIndex        =   5
  903.       Top             =   5520
  904.       Width           =   375
  905.    End
  906.    Begin VB.Label Label1 
  907.       Caption         =   "Theta"
  908.       BeginProperty Font 
  909.          name            =   "MS Sans Serif"
  910.          charset         =   0
  911.          weight          =   700
  912.          size            =   8.25
  913.          underline       =   0   'False
  914.          italic          =   0   'False
  915.          strikethrough   =   0   'False
  916.       EndProperty
  917.       Height          =   255
  918.       Index           =   1
  919.       Left            =   3240
  920.       TabIndex        =   3
  921.       Top             =   5520
  922.       Width           =   495
  923.    End
  924.    Begin VB.Label Label1 
  925.       Caption         =   "R"
  926.       BeginProperty Font 
  927.          name            =   "MS Sans Serif"
  928.          charset         =   0
  929.          weight          =   700
  930.          size            =   8.25
  931.          underline       =   0   'False
  932.          italic          =   0   'False
  933.          strikethrough   =   0   'False
  934.       EndProperty
  935.       Height          =   255
  936.       Index           =   0
  937.       Left            =   2040
  938.       TabIndex        =   1
  939.       Top             =   5520
  940.       Width           =   255
  941.    End
  942.    Begin VB.Menu mnuFile 
  943.       Caption         =   "&File"
  944.       Begin VB.Menu mnuFileLoad 
  945.          Caption         =   "&Load..."
  946.          Shortcut        =   ^L
  947.       End
  948.       Begin VB.Menu mnuFileSaveAs 
  949.          Caption         =   "Save &As..."
  950.          Shortcut        =   ^A
  951.       End
  952.       Begin VB.Menu mnuFileSep 
  953.          Caption         =   "-"
  954.       End
  955.       Begin VB.Menu mnuFileExit 
  956.          Caption         =   "E&xit"
  957.       End
  958.    End
  959. Attribute VB_Name = "ColorForm"
  960. Attribute VB_Creatable = False
  961. Attribute VB_Exposed = False
  962. Option Explicit
  963. Dim SysPalSize As Integer
  964. Dim NumStaticColors As Integer
  965. Dim StaticColor1 As Integer
  966. Dim StaticColor2 As Integer
  967. Dim syspal(0 To 255) As PALETTEENTRY
  968. ' Location of viewing eye.
  969. Dim EyeR As Single
  970. Dim EyeTheta As Single
  971. Dim EyePhi As Single
  972. Const dtheta = PI / 20
  973. Const Dphi = PI / 20
  974. Const dR = 1
  975. ' Location of focus point.
  976. Const FocusX = 0#
  977. Const FocusY = 0#
  978. Const FocusZ = 0#
  979. Dim Projector(1 To 4, 1 To 4) As Single
  980. Dim ThePicture As ObjPicture
  981. Dim ShowingParameters As Boolean
  982. Private Sub mnuFileSaveAs_Click()
  983. Dim fname As String
  984. Dim filenum As Integer
  985.     ' Allow the user to pick a file.
  986.     On Error Resume Next
  987.     LoadDialog.filename = "*.APF"
  988.     LoadDialog.Flags = cdlOFNOverwritePrompt + cdlOFNHideReadOnly
  989.     LoadDialog.ShowSave
  990.     If Err.Number = cdlCancel Then
  991.         Unload LoadDialog
  992.         Exit Sub
  993.     ElseIf Err.Number <> 0 Then
  994.         Unload LoadDialog
  995.         Beep
  996.         MsgBox "Error selecting file.", , vbExclamation
  997.         Exit Sub
  998.     End If
  999.     On Error GoTo 0
  1000.     fname = LoadDialog.filename
  1001.     LoadDialog.InitDir = Left$(fname, Len(fname) _
  1002.         - Len(LoadDialog.FileTitle) - 1)
  1003.     ' Open the file.
  1004.     filenum = FreeFile
  1005.     Open fname For Output As #filenum
  1006.     ' Write the picture.
  1007.     ThePicture.FileWrite filenum
  1008.     ' Close the file.
  1009.     Close filenum
  1010. End Sub
  1011. ' *******************************************************
  1012. ' Rotate the points in the cube and draw the cube.
  1013. ' *******************************************************
  1014. Private Sub DrawData(pic As Object)
  1015. Dim old_draw As Integer
  1016. Dim old_fill As Integer
  1017. Dim t1(1 To 4, 1 To 4) As Single
  1018. Dim t2(1 To 4, 1 To 4) As Single
  1019. Dim T12(1 To 4, 1 To 4) As Single
  1020. Dim T123(1 To 4, 1 To 4) As Single
  1021. Dim pt As Point3D
  1022. Dim factor As Single
  1023.     If ThePicture Is Nothing Then Exit Sub
  1024.     MousePointer = vbHourglass
  1025.     ' Get constants for the surfaces.
  1026.     LightKdr = CSng(KdrText.Text)
  1027.     LightKdg = CSng(KdgText.Text)
  1028.     LightKdb = CSng(KdbText.Text)
  1029.     LightKar = CSng(KarText.Text)
  1030.     LightKag = CSng(KagText.Text)
  1031.     LightKab = CSng(KabText.Text)
  1032.     LightKdist = CSng(KdistText.Text)
  1033.     LightKs = CSng(KsText.Text)
  1034.     LightN = CSng(NText.Text)
  1035.     ' Get the ambient light values.
  1036.     LightIar = CSng(IarText.Text)
  1037.     LightIag = CSng(IagText.Text)
  1038.     LightIab = CSng(IabText.Text)
  1039.     ' Get the incident light values.
  1040.     factor = _
  1041.         ThePicture.Distance(LightX, LightY, LightZ) _
  1042.         + LightKdist + 4
  1043.     LightIir = CSng(IirText.Text) * factor
  1044.     LightIig = CSng(IigText.Text) * factor
  1045.     LightIib = CSng(IibText.Text) * factor
  1046.     ' Prevent overflow errors when drawing lines
  1047.     ' too far out of bounds.
  1048.     On Error Resume Next
  1049.     ' Cull backfaces.
  1050.     ThePicture.Culled = False
  1051.     m3SphericalToCartesian EyeR, EyeTheta, EyePhi, EyeX, EyeY, EyeZ
  1052.     ThePicture.Cull EyeX, EyeY, EyeZ
  1053.     ' Clip faces behind the center of projection.
  1054.     ThePicture.ClipEye EyeR
  1055.     ' Transform coordinates into pixels.
  1056.     m3Scale t1, _
  1057.         Pict.ScaleX(1, Pict.ScaleMode, vbPixels), _
  1058.         Pict.ScaleY(1, Pict.ScaleMode, vbPixels), _
  1059.         1
  1060.     m3Translate t2, _
  1061.         -Pict.ScaleX(Pict.ScaleLeft, Pict.ScaleMode, vbPixels), _
  1062.         -Pict.ScaleY(Pict.ScaleTop, Pict.ScaleMode, vbPixels), _
  1063.         0
  1064.     m3MatMultiply T12, t1, t2
  1065.     m3MatMultiplyFull T123, Projector, T12
  1066.     ' Transform the points.
  1067.     ThePicture.ApplyFull T123
  1068.     ' Clear the screen. We must do this before
  1069.     ' selecting the pen and brush since Cls resets
  1070.     ' the pen and brush to default values.
  1071.     pic.Cls
  1072.     ' Prepare to fill polygons.
  1073.     old_draw = pic.DrawStyle
  1074.     old_fill = pic.FillStyle
  1075.     pic.DrawStyle = vbInvisible
  1076.     pic.FillStyle = vbFSSolid
  1077.     ' Display the data.
  1078.     ThePicture.DrawShaded pic, EyeR
  1079.     pic.Refresh
  1080.     ' Restore the old draw and fill styles.
  1081.     pic.DrawStyle = old_draw
  1082.     pic.FillStyle = old_fill
  1083.     ' Display the viewing parameters.
  1084.     ShowViewingParameters
  1085.     MousePointer = vbDefault
  1086. End Sub
  1087. Sub ShowViewingParameters()
  1088.     ShowingParameters = True
  1089.     RText.Text = Format$(EyeR, "0.0000")
  1090.     ThetaText.Text = Format$(EyeTheta, "0.0000")
  1091.     PhiText.Text = Format$(EyePhi, "0.0000")
  1092.     RText.Refresh
  1093.     ThetaText.Refresh
  1094.     PhiText.Refresh
  1095.     ShowingParameters = False
  1096. End Sub
  1097. Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
  1098.     Select Case KeyCode
  1099.         Case vbKeyLeft
  1100.             EyeTheta = EyeTheta - dtheta
  1101.         
  1102.         Case vbKeyRight
  1103.             EyeTheta = EyeTheta + dtheta
  1104.         
  1105.         Case vbKeyUp
  1106.             EyePhi = EyePhi - Dphi
  1107.         
  1108.         Case vbKeyDown
  1109.             EyePhi = EyePhi + Dphi
  1110.                 
  1111.         Case Else
  1112.             Exit Sub
  1113.     End Select
  1114.     m3PProject Projector, m3Perspective, EyeR, EyePhi, EyeTheta, FocusX, FocusY, FocusZ, 0, 1, 0
  1115.     DrawData Pict
  1116. End Sub
  1117. Private Sub Form_KeyPress(KeyAscii As Integer)
  1118.     Select Case KeyAscii
  1119.         Case Asc("+")
  1120.             EyeR = EyeR + dR
  1121.         
  1122.         Case Asc("-")
  1123.             EyeR = EyeR - dR
  1124.         
  1125.         Case Else
  1126.             Exit Sub
  1127.     End Select
  1128.     m3PProject Projector, m3Perspective, EyeR, EyePhi, EyeTheta, FocusX, FocusY, FocusZ, 0, 1, 0
  1129.     DrawData Pict
  1130. End Sub
  1131. Private Sub Form_Load()
  1132.     ' Make sure the screen supports palettes.
  1133.     If Not GetDeviceCaps(hdc, RASTERCAPS) And RC_PALETTE Then
  1134.         Beep
  1135.         MsgBox "This monitor does not support palettes.", _
  1136.             vbCritical
  1137.         End
  1138.     End If
  1139.     ' Get system palette size and # static colors.
  1140.     SysPalSize = GetDeviceCaps(hdc, SIZEPALETTE)
  1141.     NumStaticColors = GetDeviceCaps(hdc, NUMRESERVED)
  1142.     StaticColor1 = NumStaticColors \ 2 - 1
  1143.     StaticColor2 = SysPalSize - NumStaticColors \ 2
  1144.     MatchRainbowPalette Pict
  1145.     Pict.Cls
  1146.     ' Initialize the eye position.
  1147.     EyeR = 20
  1148.     EyeTheta = PI * 0.2
  1149.     EyePhi = PI * 0.05
  1150.     ' Initialize the projection transformation.
  1151.     m3PProject Projector, m3Perspective, EyeR, EyePhi, EyeTheta, FocusX, FocusY, FocusZ, 0, 1, 0
  1152. End Sub
  1153. ' ***********************************************
  1154. ' Load the control's palette so the non-static
  1155. ' colors are shades of red, green, blue, and gray.
  1156. ' Map the logical palette to match the system
  1157. ' palette.
  1158. ' Leave new system palette entries in SysPal().
  1159. ' ***********************************************
  1160. Sub MatchRainbowPalette(pic As Control)
  1161. Dim origpal(0 To 255) As PALETTEENTRY
  1162. Dim wid As Long
  1163. Dim hgt As Long
  1164. Dim bytes() As Byte
  1165. Dim i As Integer
  1166. Dim bm As BITMAP
  1167. Dim hbm As Integer
  1168. Dim status As Long
  1169. Dim x As Integer
  1170. Dim y As Integer
  1171. Dim val As Single
  1172. Dim dval As Single
  1173. Dim C As Integer
  1174. Dim clr As Integer
  1175. Dim logpal As Long
  1176. Dim num_each As Integer
  1177.     ' Make sure pic has the foreground palette.
  1178.     pic.ZOrder
  1179.     status = RealizePalette(pic.hdc)
  1180.     DoEvents
  1181.     ' Get the system palette entries.
  1182.     status = GetSystemPaletteEntries(pic.hdc, 0, SysPalSize, origpal(0))
  1183.         
  1184.     ' Get the image pixels.
  1185.     hbm = pic.Image
  1186.     status = GetObject(hbm, BITMAP_SIZE, bm)
  1187.     wid = bm.bmWidthBytes
  1188.     hgt = bm.bmHeight
  1189.     ReDim bytes(1 To wid, 1 To hgt)
  1190.     status = GetBitmapBits(hbm, wid * hgt, bytes(1, 1))
  1191.     ' Make the logical palette as big as possible.
  1192.     logpal = pic.Picture.hPal
  1193.     If ResizePalette(logpal, SysPalSize) = 0 Then
  1194.         Beep
  1195.         MsgBox "Error resizing logical palette.", _
  1196.             vbExclamation
  1197.         Exit Sub
  1198.     End If
  1199.     ' Blank the non-static colors.
  1200.     For i = 0 To StaticColor1
  1201.         syspal(i) = origpal(i)
  1202.     Next i
  1203.     For i = StaticColor1 + 1 To StaticColor2 - 1
  1204.         With syspal(i)
  1205.             .peRed = 0
  1206.             .peGreen = 0
  1207.             .peBlue = 0
  1208.             .peFlags = PC_NOCOLLAPSE
  1209.         End With
  1210.     Next i
  1211.     For i = StaticColor2 To 255
  1212.         syspal(i) = origpal(i)
  1213.     Next i
  1214.     status = SetPaletteEntries(logpal, 0, SysPalSize, syspal(0))
  1215.     ' Insert the non-static colors.
  1216.     num_each = (StaticColor2 - StaticColor1 - 1) / 4
  1217.     dval = 255 / (num_each - 1)
  1218.     ' Insert the reds.
  1219.     val = 0
  1220.     For i = 1 To num_each
  1221.         C = val
  1222.         val = val + dval
  1223.         With syspal(StaticColor1 + i)
  1224.             .peRed = C
  1225.             .peGreen = 0
  1226.             .peBlue = 0
  1227.         End With
  1228.     Next i
  1229.     ' Insert the greens.
  1230.     val = 0
  1231.     For i = 1 To num_each
  1232.         C = val
  1233.         val = val + dval
  1234.         With syspal(StaticColor1 + num_each + i)
  1235.             .peRed = 0
  1236.             .peGreen = C
  1237.             .peBlue = 0
  1238.         End With
  1239.     Next i
  1240.     ' Insert the blues.
  1241.     val = 0
  1242.     For i = 1 To num_each
  1243.         C = val
  1244.         val = val + dval
  1245.         With syspal(StaticColor1 + 2 * num_each + i)
  1246.             .peRed = 0
  1247.             .peGreen = 0
  1248.             .peBlue = C
  1249.         End With
  1250.     Next i
  1251.     ' Insert the grays.
  1252.     num_each = (StaticColor2 - StaticColor1 - 1) - 3 * num_each
  1253.     dval = 255 / (num_each - 1)
  1254.     val = 0
  1255.     For i = 1 To num_each
  1256.         C = val
  1257.         val = val + dval
  1258.         With syspal(StaticColor1 + 3 * num_each + i)
  1259.             .peRed = C
  1260.             .peGreen = C
  1261.             .peBlue = C
  1262.         End With
  1263.     Next i
  1264.     status = SetPaletteEntries(logpal, StaticColor1 + 1, StaticColor2 - StaticColor1 - 1, syspal(StaticColor1 + 1))
  1265.     ' Realize the new palette.
  1266.     status = RealizePalette(pic.hdc)
  1267.     pic.Refresh
  1268. End Sub
  1269. ' ***********************************************
  1270. ' Load the control's palette so the non-static
  1271. ' colors are grays. Map the logical palette to
  1272. ' match the system palette. Convert the image to
  1273. ' use the non-static grays.
  1274. ' Leave new system palette entries in SysPal().
  1275. ' ***********************************************
  1276. Sub MatchGrayPalette(pic As Control)
  1277. Dim origpal(0 To 255) As PALETTEENTRY
  1278. Dim wid As Long
  1279. Dim hgt As Long
  1280. Dim bytes() As Byte
  1281. Dim i As Integer
  1282. Dim bm As BITMAP
  1283. Dim hbm As Integer
  1284. Dim status As Long
  1285. Dim x As Integer
  1286. Dim y As Integer
  1287. Dim gray As Single
  1288. Dim dgray As Single
  1289. Dim C As Integer
  1290. Dim clr As Integer
  1291. Dim logpal As Long
  1292.     ' Make sure pic has the foreground palette.
  1293.     pic.ZOrder
  1294.     status = RealizePalette(pic.hdc)
  1295.     DoEvents
  1296.     ' Get the system palette entries.
  1297.     status = GetSystemPaletteEntries(pic.hdc, 0, SysPalSize, origpal(0))
  1298.         
  1299.     ' Get the image pixels.
  1300.     hbm = pic.Image
  1301.     status = GetObject(hbm, BITMAP_SIZE, bm)
  1302.     wid = bm.bmWidthBytes
  1303.     hgt = bm.bmHeight
  1304.     ReDim bytes(1 To wid, 1 To hgt)
  1305.     status = GetBitmapBits(hbm, wid * hgt, bytes(1, 1))
  1306.     ' Make the logical palette as big as possible.
  1307.     logpal = pic.Picture.hPal
  1308.     If ResizePalette(logpal, SysPalSize) = 0 Then
  1309.         Beep
  1310.         MsgBox "Error resizing logical palette.", _
  1311.             vbExclamation
  1312.         Exit Sub
  1313.     End If
  1314.     ' Blank the non-static colors.
  1315.     For i = 0 To StaticColor1
  1316.         syspal(i) = origpal(i)
  1317.     Next i
  1318.     For i = StaticColor1 + 1 To StaticColor2 - 1
  1319.         With syspal(i)
  1320.             .peRed = 0
  1321.             .peGreen = 0
  1322.             .peBlue = 0
  1323.             .peFlags = PC_NOCOLLAPSE
  1324.         End With
  1325.     Next i
  1326.     For i = StaticColor2 To 255
  1327.         syspal(i) = origpal(i)
  1328.     Next i
  1329.     status = SetPaletteEntries(logpal, 0, SysPalSize, syspal(0))
  1330.     ' Insert the non-static grays.
  1331.     gray = 0
  1332.     dgray = 255 / (StaticColor2 - StaticColor1 - 2)
  1333.     For i = StaticColor1 + 1 To StaticColor2 - 1
  1334.         C = gray
  1335.         gray = gray + dgray
  1336.         With syspal(i)
  1337.             .peRed = C
  1338.             .peGreen = C
  1339.             .peBlue = C
  1340.         End With
  1341.     Next i
  1342.     status = SetPaletteEntries(logpal, StaticColor1 + 1, StaticColor2 - StaticColor1 - 1, syspal(StaticColor1 + 1))
  1343.     ' Realize the gray palette.
  1344.     status = RealizePalette(pic.hdc)
  1345.     pic.Refresh
  1346. End Sub
  1347. Private Sub mnuFileExit_Click()
  1348.     Unload Me
  1349. End Sub
  1350. Private Sub mnuFileLoad_Click()
  1351. Dim fname As String
  1352. Dim filenum As Integer
  1353. Dim txt As String
  1354. Dim xmin As Single
  1355. Dim ymin As Single
  1356. Dim xmax As Single
  1357. Dim ymax As Single
  1358.     ' Allow the user to pick a file.
  1359.     On Error Resume Next
  1360.     LoadDialog.filename = "*.APF"
  1361.     LoadDialog.ShowOpen
  1362.     LoadDialog.Flags = cdlOFNFileMustExist + cdlOFNHideReadOnly
  1363.     If Err.Number = cdlCancel Then
  1364.         Unload LoadDialog
  1365.         Exit Sub
  1366.     ElseIf Err.Number <> 0 Then
  1367.         Unload LoadDialog
  1368.         Beep
  1369.         MsgBox "Error selecting file.", , vbExclamation
  1370.         Exit Sub
  1371.     End If
  1372.     On Error GoTo 0
  1373.     fname = LoadDialog.filename
  1374.     LoadDialog.InitDir = Left$(fname, Len(fname) _
  1375.         - Len(LoadDialog.FileTitle) - 1)
  1376.     ' Clear the picture.
  1377.     Set ThePicture = Nothing
  1378.     ' Open the file.
  1379.     filenum = FreeFile
  1380.     Open fname For Input As #filenum
  1381.     ' Make sure it's an Object Picture File.
  1382.     Input #filenum, txt
  1383.     If txt <> "3D APF PICTURE" Then
  1384.         Close filenum
  1385.         Caption = "Color"
  1386.         Beep
  1387.         MsgBox "Error reading file """ & fname & """.", , vbExclamation
  1388.         Exit Sub
  1389.     End If
  1390.     ' Read the picture.
  1391.     Set ThePicture = New ObjPicture
  1392.     ThePicture.FileInput filenum
  1393.     ' Close the file.
  1394.     Close filenum
  1395.     Caption = "Color [" & LoadDialog.FileTitle & "]"
  1396.     ' Refresh the display.
  1397.     DrawData Pict
  1398. End Sub
  1399. Private Sub PhiText_Change()
  1400.     If ShowingParameters Then Exit Sub
  1401.     EyePhi = CSng(PhiText.Text)
  1402.     m3PProject Projector, m3Perspective, EyeR, EyePhi, EyeTheta, FocusX, FocusY, FocusZ, 0, 1, 0
  1403.     DrawData Pict
  1404. End Sub
  1405. Private Sub RText_Change()
  1406.     If ShowingParameters Then Exit Sub
  1407.     EyeR = CSng(RText.Text)
  1408.     m3PProject Projector, m3Perspective, EyeR, EyePhi, EyeTheta, FocusX, FocusY, FocusZ, 0, 1, 0
  1409.     DrawData Pict
  1410. End Sub
  1411. Private Sub ThetaText_Change()
  1412.     If ShowingParameters Then Exit Sub
  1413.     EyeTheta = CSng(ThetaText.Text)
  1414.     m3PProject Projector, m3Perspective, EyeR, EyePhi, EyeTheta, FocusX, FocusY, FocusZ, 0, 1, 0
  1415.     DrawData Pict
  1416. End Sub
  1417.